<?php
namespace app\admin\model;

use think\Model;
use think\Db;

class Shop extends Model
{
    public function shopInfo($info)
    {
        // var_dump($info);
        $data = DB::name('admin')->where('shop_id = '. $info['shop_value'])->select();
        return $data;
    }
    public function delId($id)
    {
        $del = Db::name('shop_spc')->delete($id);
        return $del;
    }
    public function shopDel($id)
    {
        $del = Db::name('shop')->delete($id);
        return $del;
    }
    public function updateUser($info)
    {
        var_dump($info);
        $user = [
            'shop_title' => $info['shop_title'],
            'shop_desc' => $info['shop_desc'],
            'shop_img' => $info['shop_img'],
        ];
        var_dump($info);
        $update = DB::name('shop')->where('id = '. $info['id'])->update($user);
        return $update;
    }
}